<?php common\components\View::regCss('login.css') ?>
<style type="text/css">
    .forget-btn{
        font-size: 14px;
        color: #999999;
        text-align: center;
    }
    .forget-btn{
        margin-top: 5px;
        text-align: right;
    }
    .submitBtn {
        margin-top: 20px;
        margin-bottom: 10px;
    }
    .regi-btn{
        width: 70%;
        margin: 40px auto;
        border: 1px solid #e6262e;
        padding: 8px 0px;
        font-size: 1.2em;
        color: #999999;
        border-radius: 25px;
        text-align: center;
        font-size: 16px; 
        margin-top: 20px;
    }
    .bg {
        background: #fff;
    }
    .input_box {
        border-bottom: none;
    }
    .form-control {
        box-shadow: none;
        -webkit-box-shadow: none;
    }
    .border_bottom{
        border-bottom: 1px solid #f0f0f0;
        padding: 4px 0;
    }
    .form-group {
        margin-bottom: 0;
    }
    .type_name img{
        width: 22px;
        height: 22px;
    }
</style>
    <div class="container">
        <?php $form = self::beginForm(['showLabel' => false]) ?>
            <div class="row">
                <div class="col-xs-12">
                    <div class="logo_img">
                        <img src="<?= config('web_logo') ?>" alt="<?= config('web_name') ?>">
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="login_input border_bottom">
                    <div class="type_box login_type_ls ">
                        <div class="type_name"><img src="/images/userName.png" width="18" height="18"></div>
                        <div class="input_box">
                            <?= $form->field($model, 'username')->textInput(['placeholder' => '请输入注册手机号']) ?>
                        </div>
                    </div>
                </div>
                <div class="login_input border_bottom">
                    <div class="type_box login_type_ls ">
                        <div class="type_name"><img src="/images/password.png" width="18" height="18"></div>
                        <div class="input_box">
                            <?= $form->field($model, 'password')->passwordInput(['placeholder' => '请输入密码']) ?>
                        </div>
                    </div>
                </div>
<!--                 <div class="login_input">
                    <?= $form->field($model, 'rememberMe')->checkbox() ?>
                </div> -->
                <div class="login_input mr_t">
                    <!-- <span class="pull-right"><a href="<?= url('site/register') ?>">注册新用户</a></span> -->
                    
                    <div class="forget-btn">
                        <a href="<?= url('site/forget') ?>">忘记密码 ？</a>
                    </div>

                    
                    
                </div>
            </div>
<!--             <div class="login_btn">
                <button id="submitBtn">登录</button>
            </div> -->
            <div class="submitBtn">
                登录
            </div>
            <div class="regi-btn">
                <a href="<?= url('site/register') ?>">注册新用户</a>
            </div>
        <?php self::endForm() ?>
    </div>
<script>
$(function () {
    $(".submitBtn").click(function () {
        $("form").ajaxSubmit($.config('ajaxSubmit', {
            success: function (msg) {
                if (!msg.state) {
                    return $.alert(msg.info);
                } else {
                    window.location.href = msg.info;
                }
            }
        }));
        return false;
    });
});
</script>